.class public final Lcom/farmis/feedme/Triggers;
.super Ljava/lang/Object;
.source "Triggers.kt"


# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
    value = "SMAP\nTriggers.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Triggers.kt\ncom/farmis/feedme/Triggers\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,37:1\n9691#2,2:38\n9691#2,2:40\n*E\n*S KotlinDebug\n*F\n+ 1 Triggers.kt\ncom/farmis/feedme/Triggers\n*L\n25#1,2:38\n33#1,2:40\n*E\n"
.end annotation


# static fields
.field public static final INSTANCE:Lcom/farmis/feedme/Triggers;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .line 22
    new-instance v0, Lcom/farmis/feedme/Triggers;

    invoke-direct {v0}, Lcom/farmis/feedme/Triggers;-><init>()V

    sput-object v0, Lcom/farmis/feedme/Triggers;->INSTANCE:Lcom/farmis/feedme/Triggers;

    return-void
.end method

.method private constructor <init>()V
    .locals 0

    .line 22
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final addShownDialog(Landroid/content/Context;Lcom/farmis/feedme/abs/AbsSocialNetwork;)V
    .locals 1

    const-string v0, "c"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "dialog"

    invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 36
    invoke-static {p1}, Lcom/farmis/feedme/utils/UtilsKt;->sp(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object p1

    invoke-static {}, Lcom/farmis/feedme/TriggersKt;->getKEY_TRIGGER_SHOWN_SET()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p2}, Lcom/farmis/feedme/abs/AbsSocialNetwork;->getKey()Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, v0, p2}, Lcom/farmis/feedme/utils/UtilsKt;->addToSet(Landroid/content/SharedPreferences;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public final isTriggered(Landroid/content/Context;)Z
    .locals 4

    const-string v0, "c"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 25
    invoke-static {}, Lcom/farmis/feedme/TriggersKt;->getTRIGGER_ARRAY()[Lcom/farmis/feedme/abs/AbsTrigger;

    move-result-object v0

    const/4 v1, 0x0

    const/4 v2, 0x0

    .line 38
    :goto_0
    array-length v3, v0

    if-ge v2, v3, :cond_1

    aget-object v3, v0, v2

    .line 26
    invoke-virtual {v3, p1}, Lcom/farmis/feedme/abs/AbsTrigger;->isTriggered(Landroid/content/Context;)Z

    move-result v3

    if-eqz v3, :cond_0

    const/4 p1, 0x1

    return p1

    :cond_0
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_1
    return v1
.end method
